import { http } from '@/utils/http'
import type { ServiceSuccess } from '@/types/service'

// 获取服务商信息
export const getServiceSuccess = () => {
	return http<ServiceSuccess>({
		method: 'GET',
		url: '/api/server/ser/getSerInfo',
	})
}
// 服务商挂单列表
export const getSerBuyOrderList = () => {
	return http({
		method: 'GET',
		url: '/api/server/serBuyOrder/getSerBuyOrderList',
	})
}
// 下架挂单
export const takenShelves = () => {
	return http({
		method: 'POST',
		url: '/api/server/serBuyOrder/offShelfBuyOrder/{orderNum}',
	})
}
// 添加挂单
export const addOrder = () => {
	return http({
		method: 'POST',
		url: '/api/server/serBuyOrder/submitSerBuyOrder',
	})
}
// 兑换KOI
export const exchangeKoi = (data) => {
	return http({
		method: 'POST',
		url: '/api/server/serBuyOrder/userSellKoi',
		data
	})
}